<?php

namespace  Helper;

class Mysql
{
    private static $instance;


    public static function getInstance(){
        if(self::$instance){
            return self::$instance;
        }else{
            $redisConf = Config::getInstance()->get('mysql');
            $mysqli = new \MysqliDb([
                'host'     => $redisConf['host'],
                'port'     => $redisConf['port'],
                'username'     => $redisConf['user'],
                'password' => $redisConf['password'],
                'db' => $redisConf['database'],
                'prefix' => 'kf_',
            ]);
            self::$instance = $mysqli;
            return  self::$instance;
        }
    }



}